<template>
  <view>
    <web-view :src="src" :title="title" :update-title="false" @load="loadTitle"></web-view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      title: '',
      type: '',
      rule: '',
      src: ''

    }
  },
  onLoad(option) {
    console.log('%c [ option ]-26', 'font-size:13px; background:pink; color:#bf2c9f;', option)
    this.src = option.linkUrl
    // this.qiandao()
    // if (this.type == 1) {
    //   this.src = linkUrl
    //   this.title = '发布须知'
    // }
    // if (this.type == 2) {
    //   this.src = linkUrl
    //   this.title = '会员须知'
    // }
    // if (this.type == 3) {
    //   this.src = linkUrl
    //   this.title = '入驻须知'
    // }
    // if (this.type == 4) {
    //   this.src = linkUrl
    //   this.title = '个人信息收集须知'
    // }

  },
  methods: {
    loadTitle() {
      uni.setNavigationBarTitle({
        title: '000'
      });
    },
    qiandao: function () {
      this.post('api/index/site', '', true).then(res => {
        console.log(res)
        if (res.code == 1) {
          if (this.type == 1) {
            this.rule = res.data.fbxz
          }
          if (this.type == 2) {
            this.rule = res.data.hyxy
          }
          if (this.type == 3) {
            this.rule = res.data.qyrzxy
          }
          if (this.type == 4) {
            this.rule = res.data.grxxxy
          }

        }
      })
    },
  }
}
</script>

<style>
</style>